package com.haipi.action;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.haipi.model.DemoInfo;
import com.haipi.service.IDemoService;

@Controller
@Scope("singleton")
public class DemoAction
{
    
    @Resource
    private IDemoService demoService;
    
    @RequestMapping(value = "/demo/test.dox")
    public String test(HttpServletRequest request, DemoInfo demoInfo)
    {
        demoInfo = demoService.test(demoInfo.getProp());
        
        request.setAttribute("string", "ok!!!!!!!");
        
        return "/webapp/web/demo/test.jsp";
    }
    
}
